﻿@model VietPremier.Models.GetTravelInformationModel
@{
    ViewBag.Title = Model.travelInfo.Titletag;
    ViewBag.Description = Model.travelInfo.Meta_description;
    ViewBag.Keywords = Model.travelInfo.Meta_keyword;
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<script type="text/javascript">
    jQuery(document).ready(function () {        
        var image = "url('/Content/cssFrontEnd/images/" + '@ViewBag.Background' + "')";
        if (parseBoolean('@ViewBag.Show') == true) {
            $("#body").css("background-image", image);
        }
        //    $("#body").attr("background-image", "url('/Content/cssFrontEnd/images/')");
        //    $("#body").attr("background-size", "cover");
        //    $("#body").attr("background-repeat", "no-repeat");
        //    $("#body").attr("background-attachment", "fixed");
        //    $("#body").attr("background-position", "center top");
    });
    function parseBoolean(str) {
        return /^true$/i.test(str);
    }
    </script>

<div class="row-fluid">
    <div class="span3">
        <!--/ .box-->
        @Html.Action("LeftMenu", "Home")
        @Html.Action("Onlinesupport", "Home")
        @Html.Action("News_Event", "Home")
    </div>
    <!--/ .span3-->
    <div class="span6">
        <div class="box-about">
            @Html.Raw(Model.travelInfo.Description)
        </div>
        <!--/ .box-about-->
        @for (int i = 0; i <= (Model.listTravelProduct.Count() - 1) / 2; i++)
        {
            <div class="row-fluid">
                @for (int j = 0; j < 2 && (i * 2 + j) < Model.listTravelProduct.Count(); j++)
                {
                    <div class="boxtour span6">
                        <img src="@Url.Content(string.Concat("~/Content/upload/travelproductions/", @Model.listTravelProduct.Skip(i * 2 + j).Take(1).SingleOrDefault().Image))" style="width: 228px; height: 150px" />
                        <h5><a href="@Url.Action("Product", "TravelInformation", new { title = Utilities.Encode(@Model.listTravelProduct.Skip(i * 2 + j).Take(1).SingleOrDefault().Name) })">@Model.listTravelProduct.Skip(i * 2 + j).Take(1).SingleOrDefault().Name</a></h5>
                        @if(@Model.listTravelProduct.Skip(i * 2 + j).Take(1).SingleOrDefault().Description.Length > 230)
                        {
                            @Html.Raw(@Model.listTravelProduct.Skip(i * 2 + j).Take(1).SingleOrDefault().Description.Substring(0,230) + "...")
                        }
                        else
                        {
                            @Html.Raw(@Model.listTravelProduct.Skip(i * 2 + j).Take(1).SingleOrDefault().Description)
                        }
                        <p class="tag">
                      
                                                <a href="@Url.Action("Product", "TravelInformation", new { title = Utilities.Encode(@Model.listTravelProduct.Skip(i * 2 + j).Take(1).SingleOrDefault().Name) })">
                                                    <img style="float:right" src="@Url.Content("~/Content/cssFrontEnd/images/nutnext.png")" /></a>
                        </p>
                    </div>
                    <!--/ .boxtour-->                                	            
                }
            </div>
            <!--/ .row-fluid-->
        }
    </div>
    <!--/ .span6-->
    <div class="span3">
        @Html.Action("Brochure","Home")
        @Html.Action("Spotlight", "Home")
        @Html.Action("Testimonial", "Home")
    </div>
    <!--/ .span3-->
</div>
<!--/ .row-fluid-->
